cmake_minimum_required(VERSION 3.13)

# Pull in SDK (must be before project)
include(C:/Users/yongj/Documents/Pico/pico-sdk/external/pico_sdk_import.cmake)

set(PICO_EXAMPLES_PATH ${PROJECT_SOURCE_DIR})

project(car-Balance C CXX ASM)

# Initialize the SDK
pico_sdk_init()

add_executable(car-Balance
        main.c lib/mcp2515/mcp2515.c lib/mcp2515/mcp2515.h lib/mcp2515/mcp2515_can_dfs.h lib/UART/uart.c lib/DJI-P36/P36.c lib/DJI-P36/P36.h lib/DJI-P36/types.h
        lib/MPU6050/mpu6050.h lib/MPU6050/mpu6050.c lib/MPU6050/eMPL/dmpKey.h lib/MPU6050/eMPL/dmpmap.h lib/MPU6050/eMPL/inv_mpu.c lib/MPU6050/eMPL/inv_mpu.h
        lib/MPU6050/eMPL/inv_mpu_dmp_motion_driver.c lib/MPU6050/eMPL/inv_mpu_dmp_motion_driver.h
        )

include_directories(lib/MPU6050)
include_directories(lib/MPU6050/eMPL)
# Pull in our (to be renamed) simple get you started dependencies
target_link_libraries(car-Balance pico_stdlib hardware_spi hardware_i2c)

# create map/bin/hex file etc.
pico_add_extra_outputs(car-Balance)

# enable usb output, disable uart output
pico_enable_stdio_usb(car-Balance 0)
pico_enable_stdio_uart(car-Balance 1)